package com.hwtx.form.persistence.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@TableName("api_def_field")
@Schema(description = "API字段定义表")
public class ApiDefField {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "表名")
    private String tableName;

    @Schema(description = "序号")
    private Integer num;

    @Schema(description = "字段描述")
    private String description;

    @Schema(description = "数据模型定义字段引用")
    private Long modelDetailId;

    @Schema(description = "API定义字段引用")
    private String apiCode;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "修改时间")
    private Date updateTime;

    @Schema(description = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    private String createId;

    @Schema(description = "更新人ID")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateId;
}
